<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
    <title>Play Sign In form Responsive Widget Template : W3Layouts</title>
    <!-- Meta tags -->
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">

    <!-- Google fonts -->
    <link href="//fonts.googleapis.com/css2?family=Kumbh+Sans:wght@300;400;700&display=swap" rel="stylesheet">

    <!-- CSS Stylesheet -->
    <c:set var="path" value="${pageContext.request.contextPath}"></c:set>
    <link rel="stylesheet" href="${path}/user/static/css/style.css" type="text/css" media="all" />

    <!-- fontawesome v5-->
    <script src="https://kit.fontawesome.com/af562a2a63.js" crossorigin="anonymous"></script>

</head>

<body>
    <div class="signinform">
        <h1>用户登录</h1>
        <!-- container -->
        <div class="container">
            <!-- main content -->
            <div class="w3l-form-info">
                <div class="w3l_form">
                    <div class="left_grid_info">
                        <img src="${path}/user/static/images/image.svg" alt="" />
                    </div>
                </div>
                <div class="w3_info">
                    <h2>登录</h2>
                    <form action="${pageContext.request.contextPath}/user/login" method="post">
                        <div style="width: 300px;margin: 0 auto;text-align: center;color: red">${msg}</div>
                        <div class="input-group">
                            <span><i class="fas fa-user" aria-hidden="true"></i></span>
                            <input type="text" name="username" value="" required  lay-verify="required" placeholder="请输入邮箱账号" autocomplete="off" class="layui-input">
                        </div>
                        <div class="input-group">
                            <span><i class="fas fa-key" aria-hidden="true"></i></span>
                            <input type="password" name="password" value="" required  lay-verify="required" placeholder="请输入密码" autocomplete="off" class="layui-input">
                        </div>
                        <div class="inputbox">
                        <input type="text" name="validCode" required  lay-verify="required" placeholder="请输入验证码" autocomplete="off" class="layui-input">
                        <img src="${path}/valid" onclick="change(this)" alt="点击验证码可刷新" class="vierfy-code">
                        <i class="l"></i>
                    </div>
                        <button class="btn btn-primary btn-block" type="submit"> 登录</button>
                        <button class="btn btn-primary btn-block" type="submit">注册</button>

                    </form>
                    </div>
                </div>
            </div>
            <!-- //main content -->
        </div>
    </div>
</body>
<script>
    function change(o){
        o.src = "${path}/valid?time="+new Date();
    }
</script>
</html>